HaloScript like most programming languages includes a number of data types, data types are just a way for the code to tell what sort of data it is working with (e.g. whatever it a sound tag or a string).

These can be broken into 3 main groups: internal, basic and complex.

Internal

There are 4 types that are mostly used internally by the system: unparsed, special form, function name and passthrough. Out of these the only one of note for us is passthrough as it can be "cast" or converted to any other type. See Type Casting for more.

Basic

These are the basic types you would expect in a scripting language and are used by a lot of different functions.

NameDescription
voidSpecial type used to mean nothing, only as a function return type.
booleanTrue or false
realA float point number (1500.2, -1.53, 3.14159, etc)
shortA whole number between -32767 and 32767
longA whole number between -2147483647 and 2147483647
stringText ("hello", "test", "120")
string_idAnother way to reference a string-like value, sometimes used for localization
scriptName of another script (cinematic_fade_from_black, welcome, etc)

Complex

Most HaloScript types belong in this category, these are mostly types added for use in a specific function. It can be further broken into multiple subsets: tags, enums, objects, object names and misc.

Tags

These reference a specific tag, the compiler gets the tag datum and adds the tag to the References block in the scenario.

The HaloScript compiler should check the tag type is correct, but this check appears to be disabled by specifying the full path with extension (sound\ui\shield_hit.sound, instead of sound\ui\shield_hit)

The following types are tags/tag refs:

  • sound
  • effect
  • damage
  • looping_sound
  • animation_graph
  • damage_effect
  • object_defintion
  • bitmap
  • shader
  • render model
  • structure definition
  • lightmap definition
  • style

Style is only a tag ref in H2Codez, it's non-functional in the release HEK and wasn't quite a tag ref in the Bungie HEK.

Enums

Enums short for enumerated are used for named values.

NameDescriptionValue List
game_difficultyHow hard the game isEasy, Normal, Heroic, Legendary
teamWhat team an AI or player is on, used in campaigndefault, player, human, covenant, flood, sentinel, heretic, prophet, unused8, unused9, ... unused15
actor_typeunknown (code removed)N/A
hud_cornerRelated to old HUDN/A
model_stateTODOTODO
network_eventunknown (code removed)N/A

Objects / Object Names

Objects and Object names are the same with one minor difference, objects can be set to NONE meaning no object and object names can't. So you can use sound_impulse_start without an object but not object_create

The full list of object/object name types is:

  • object
  • unit
  • vehicle
  • weapon
  • device
  • scenery

Miscellaneous

The remaining types that don't easily fit into any of the above.

NameDescriptionExample
object_listA list of objects, one with only one object can be created the same way as object_name
unit_seat_mapping
trigger_volume
cutscene_flag
cutscene_camera_point
cutscene_title
cutscene_recording
device_group
aiReference to an AI starting location, squad or squad group.squad1, squadgroup, squad_alpha/4
ai_command_listObsolete N/A
ai_command_script
ai_behaviorAI behaviourengage, fight, shoot_corpse
ai_orders
starting_profile
conversationElement of the AI Conversations tag block in scenario
structure_bsp
navpoint
point_referencePoint set and point in Scripting data in scenariopoint_set/point_b
hud_messageObsolete, used to be a message in the hud_message_text tag, commands that supported it are no longer functional.